/*
package NiuKe;

import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;

*/
/**
 * @Description:
 * @Author: Hanzao
 * @Date: 2022/06/17/13:07
 *//*

public class HJ80 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num1 = scanner.nextInt();
        Set set = new TreeSet();
        for(int i=0;i<num1;i++){
            set.add(scanner.nextInt());
        }
        int num2 = scanner.nextInt();
        for(int i=0;i<num2;i++){
            set.add(scanner.nextInt());
        }
        set.forEach(System.out::print);
    }
}
*/
